<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>报价单</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <link rel="stylesheet" href="${ctxStatic}/css/list.css">
    <script>
    <!-- 采购类别  -->
	var purchaseType = "${purchaseContract.purchaseType}";
   //检索 
   function searchListForm() {
	   var goPath = "";
	   if (purchaseType == "PURCHASE_TYPE-20") {
		   goPath = "searchMaterialList";
		}else if(purchaseType == "PURCHASE_TYPE-10"){
			goPath = "findMaterialList";
		}else{
			goPath = "findMaterialAlertList";
		}
    	var params = $("#searchForm").serialize();
    	$("#activity_pane").showLoading();
		$.post("${ctx}/purchase/contract/"+goPath ,params, function(result) {
			var listHtml = result["material"];
			var pageHtml = result["page"];
			$("#listHtml").html(listHtml);
			$("#activity_pane").hideLoading();
		}, 'json');
	} 
        
 //重置
   function clean(){
       $("input[id!='ognizationNameB']").val("");
       $("select[id!='ognizationId']").val("");
       $("select[id!='ognizationId']").select2(); 
       if (purchaseType == "PURCHASE_TYPE-10") {
	       ogFun();
       }
       searchListForm();
   }
 
 function checkMaterial() {
	 <!-- 查询面料是否已创建采购 -->
 	<!-- 供货商ID -->
 	var ognizationIDB = "${purchaseContract.ognizationIDB }";
 	<!-- 面料对象数量 -->
 	var materialIdObjLength = $("#listHtml tr.trSelected").length;
 	var materialId = "";
 	var materialIdStr = "";
 	for (var i = 0; i < materialIdObjLength; i++) {
 		materialId = $("#listHtml tr.trSelected").find(".materialID")[i].value;
 		if (materialId != null && materialId != "") {
 			materialIdStr = materialIdStr + materialId + ",";
			}
		}
 	var paramCheck = {	"materialIdStr":materialIdStr,
 						"purchaseType":purchaseType,
 						"ognizationIDB":ognizationIDB
 					 };
 	$.post("${ctx}/purchase/contract/checkMaterial",paramCheck,function(result){
 		if(result == "true"){
 			selectStyle();
 		}else{
 			tipParent(result+"已创建采购合同");
 			return;
 		}
 	},'json');
}
 
 
    function selectStyle() {
    	//获取 iframe 数量 
    	var frLength = window.parent.frames.length;
    	//父画面下标 
    	var parentIndex = frLength-2;
    	var trSelectedLength = $("#listHtml tr.trSelected").length;
    	if (trSelectedLength == 0) {
    		tipParent("<spring:message code="supplier_pleaseChoose"/>面料");
    		return false;
		}
    	var trSelected = $("#listHtml tr.trSelected");
    	var statusIndex = window.parent.frames[parentIndex].getIndex();
    	$.each(trSelected, function(i, item){
    		var purchaseType = "${purchaseContract.purchaseType}";
    		if (purchaseType == "PURCHASE_TYPE-20") {
	    		var html = "";
	    		var idHtml = "";
	    		var index = parseInt(statusIndex)+parseInt(i)+parseInt(1);
	    		var contractID = $("#listHtml tr.trSelected").find(".contractID")[i].value;
	    		var indentID = $("#listHtml tr.trSelected").find(".indentID")[i].value;
	    		var styleID = $("#listHtml tr.trSelected").find(".styleID")[i].value;
	    		var materialReservePurchaseID = $("#listHtml tr.trSelected").find(".materialReservePurchaseID")[i].value;
	    		var materialID = $("#listHtml tr.trSelected").find(".materialID")[i].value;
	    		idHtml += "<input type='hidden' name='materialList["+index+"].contractID' value='"+contractID+"'/>";
	    		idHtml += "<input type='hidden' name='materialList["+index+"].indentID' value='"+indentID+"'/>";
	    		idHtml += "<input type='hidden' name='materialList["+index+"].styleID' value='"+styleID+"'/>";
	    		idHtml += "<input type='hidden' name='materialList["+index+"].materialReservePurchaseID' value='"+materialReservePurchaseID+"'/>";
	    		idHtml += "<input type='hidden' class='materialID' name='materialList["+index+"].materialID' value='"+materialID+"'/>";
	    		idHtml += "<input type='hidden' class='statusIndex' value='"+index+"'/>";
	    		var materialFile = $("#listHtml tr.trSelected").find(".materialFile")[i].value;
	    		var materialCode = $("#listHtml tr.trSelected").find(".materialCode")[i].value;
	    		var materialNameCN = $("#listHtml tr.trSelected").find(".materialNameCN")[i].value;
	    		var materialColor = $("#listHtml tr.trSelected").find(".materialColor")[i].value;
	    		var materialSpec = $("#listHtml tr.trSelected").find(".materialSpec")[i].value;
	    		var materialSpecUnit = $("#listHtml tr.trSelected").find(".materialSpecUnit")[i].value;
	    		var reserveQuantity = $("#listHtml tr.trSelected").find(".reserveQuantity")[i].value;
	    		var realityQuantity = $("#listHtml tr.trSelected").find(".realityQuantity")[i].value;
	    		var customerContractNO = $("#listHtml tr.trSelected").find(".customerContractNO")[i].value;
	    		var purchaseUnitPrice = $("#listHtml tr.trSelected").find(".purchaseUnitPrice")[i].value;
                var purchaseReserveQuantity = $("#listHtml tr.trSelected").find(".purchaseReserveQuantity")[i].value;
	    		html += "<tr>";
	    		html += "<td><p class='tab-dw'><img src='${ctxStatic}/images/btn-sc.png' style='width: 25px' onclick='deleteCurrentRow(this);'></p></td>";
	    		html += "<td><p class='tab-wltp'><img class='tab-wltp' src='"+materialFile+"'></p></td>";
	    		html += "<td><p class='width-150px'>"+materialCode+"<br>"+materialNameCN+"</p></td>";
	    		html += "<td><p class='width-50px'>"+materialSpec+"</p></td>";
	    		html += "<td><p class='tab-dw'>"+materialSpecUnit+"</p></td>";
	    		html += "<td><p class='tab-hjje'>"+materialColor+"</p></td>";
	    		html += "<td><p class='tab-dh'>"+customerContractNO+"</p></td>";
	    		html += "<td><p class='tab-sh'>"+reserveQuantity+"</p></td>";
	    		html += "<td><p class='width-70px'>"+realityQuantity+"</p></td>";
	    		html += "<td><p class='width-70px'><input type='tel' id='purchasePrice' name='materialList["+index+"].purchaseUnitPrice' value='"+purchaseUnitPrice+"' onchange='myMath(this);' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
	    		html += "<td><p class='width-70px'><input type='tel' id='purchaseQuantity' name='materialList["+index+"].purchaseReserveQuantity' value='"+purchaseReserveQuantity+"' onchange='myMath(this);quantity();' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
	    		html += "<td><p class='width-70px'><input type='tel' id='purchaseOther' name='materialList["+index+"].purchaseOtherCost' value='' onchange='myMath(this);' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
	    		html += "<td><p class='width-70px'><label id='purchaseAmount'></label></p></td>";
	    		html += idHtml;
	    		html += "</tr>";
	    		window.parent.frames[parentIndex].$("#listHtml").append(html);
    		}else if (purchaseType == "PURCHASE_TYPE-10"){
    			var html = "";
	    		var idHtml = "";
	    		var index = parseInt(statusIndex)+parseInt(i)+parseInt(1);
	    		var materialID = $("#listHtml tr.trSelected").find(".materialID")[i].value;
	    		idHtml += "<input type='hidden' class='materialID' name='materialList["+index+"].materialID' value='"+materialID+"'/>";
	    		idHtml += "<input type='hidden' class='statusIndex' value='"+index+"'/>";
	    		var materialFile = $("#listHtml tr.trSelected").find(".materialFile")[i].value;
	    		var materialCode = $("#listHtml tr.trSelected").find(".materialCode")[i].value;
	    		var materialNameCN = $("#listHtml tr.trSelected").find(".materialNameCN")[i].value;
	    		var materialColor = $("#listHtml tr.trSelected").find(".materialColor")[i].value;
	    		var materialSpec = $("#listHtml tr.trSelected").find(".materialSpec")[i].value;
	    		var materialSpecUnit = $("#listHtml tr.trSelected").find(".materialSpecUnit")[i].value;
	    		var ognizationNameB = $("#listHtml tr.trSelected").find(".ognizationNameB")[i].value;
	    		var brandName = $("#listHtml tr.trSelected").find(".brandName")[i].value;
	    		html += "<tr>";
	    		html += "<td><p class='tab-dw'><img src='${ctxStatic}/images/btn-sc.png' style='width: 25px' onclick='deleteCurrentRow(this);'></p></td>";
	    		html += "<td><p class='tab-wltp'><img class='tab-wltp' src='"+materialFile+"'></p></td>";
	    		html += "<td><p class='width-150px'>"+materialCode+"<br>"+materialNameCN+"</p></td>";
	    		html += "<td><p class='width-50px'>"+materialSpec+"</p></td>";
	    		html += "<td><p class='tab-dw'>"+materialSpecUnit+"</p></td>";
	    		html += "<td><p class='width-160px'>"+ognizationNameB+"</p></td>";
	    		html += "<td><p class='width-160px'>"+brandName+"</p></td>";
	    		html += "<td><p class='width-70px'><input type='tel' id='purchasePrice' name='materialList["+index+"].purchaseUnitPrice' value='' onchange='myMath(this);' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
	    		html += "<td><p class='width-70px'><input type='tel' id='purchaseQuantity' name='materialList["+index+"].purchaseReserveQuantity' value='' onchange='myMath(this);quantity();' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
	    		html += "<td><p class='width-70px'><input type='tel' id='purchaseOther' name='materialList["+index+"].purchaseOtherCost' value='' onchange='myMath(this);' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
	    		html += "<td><p class='width-70px'><label id='purchaseAmount'></label></p></td>";
	    		html += idHtml;
	    		html += "</tr>";
	    		window.parent.frames[parentIndex].$("#listHtml").append(html);
			}else{
                var html = "";
                var idHtml = "";
                var index = parseInt(statusIndex)+parseInt(i)+parseInt(1);
                var materialID = $("#listHtml tr.trSelected").find(".materialID")[i].value;
                idHtml += "<input type='hidden' class='materialID' name='materialList["+index+"].materialID' value='"+materialID+"'/>";
                idHtml += "<input type='hidden' class='statusIndex' value='"+index+"'/>";
                var materialFile = $("#listHtml tr.trSelected").find(".materialFile")[i].value;
                var materialCode = $("#listHtml tr.trSelected").find(".materialCode")[i].value;
                var materialNameCN = $("#listHtml tr.trSelected").find(".materialNameCN")[i].value;
                var materialColor = $("#listHtml tr.trSelected").find(".materialColor")[i].value;
                var materialSpec = $("#listHtml tr.trSelected").find(".materialSpec")[i].value;
                var materialSpecUnitCd = $("#listHtml tr.trSelected").find(".materialSpecUnitCD")[i].value;
                var materialAlertQuantity =$("#listHtml tr.trSelected").find(".materialAlertQuantity")[i].value;
                var materialAlertDate = $("#listHtml tr.trSelected").find(".materialAlertDate")[i].value;
                var purchaseUnitPrice = $("#listHtml tr.trSelected").find(".purchaseUnitPrice")[i].value;
                var purchaseReserveQuantity = $("#listHtml tr.trSelected").find(".purchaseReserveQuantity")[i].value;
                /*var ognizationNameB = $("#listHtml tr.trSelected").find(".ognizationNameB")[i].value;*/
                html += "<tr>";
                html += "<td><p class='tab-dw'><img src='${ctxStatic}/images/btn-sc.png' style='width: 25px' onclick='deleteCurrentRow(this);'></p></td>";
                html += "<td><p class='tab-wltp'><img class='tab-wltp' src='"+materialFile+"'></p></td>";
                html += "<td><p class='width-150px'>"+materialCode+"<br>"+materialNameCN+"</p></td>";
                html += "<td><p class='width-50px'>"+materialSpec+"</p></td>";
                html += "<td><p class='tab-dw'>"+materialSpecUnitCd+"</p></td>";
                html += "<td><p class='width-160px'>"+materialAlertQuantity+"</p></td>";
                html += "<td><p class='width-160px'>"+materialAlertDate+"</p></td>";
                html += "<td><p class='width-70px'><input type='tel' id='purchasePrice' name='materialList["+index+"].purchaseUnitPrice' value='"+purchaseUnitPrice+"' onchange='myMath(this);' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
                html += "<td><p class='width-70px'><input type='tel' id='purchaseQuantity' name='materialList["+index+"].purchaseReserveQuantity' value='"+purchaseReserveQuantity+"' onchange='myMath(this);quantity();' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
                html += "<td><p class='width-70px'><input type='tel' id='purchaseOther' name='materialList["+index+"].purchaseOtherCost' value='' onchange='myMath(this);' style='height:65px' onblur='formatMoney(this,3);' onfocus='unFormat(this);'></p></td>";
                html += "<td><p class='width-70px'><label id='purchaseAmount'></label></p></td>";
                html += idHtml;
                html += "</tr>";
                window.parent.frames[parentIndex].$("#listHtml").append(html);
            }
    	});
    		closeWin();
	}
    
    //公司联动 
    function ogFun(){
    	var pleaseSelect = '<option value="">' + '<spring:message code="supplier_pleaseChoose"/>'+'</option>';
    	var ognizationId = $("#ognizationId").val();
    	$.post("${ctx}/purchase/contract/findBrandList?ognizationId="+ognizationId ,"", function(result) {
    		var html = "";
            $(result).each(function(i,e) {
            	if (e.apBrandId!=null) {
	                html += "<option value='"+e.apBrandId+"'";
	                html += ">"+ e.brandCn+ "</option>";
				}
			});
            $("#brandId").html(pleaseSelect+html);
            $("#brandId").select2();
		}, 'json');
    }
    
  //选择按钮事件
    function selectFunction(obj){
    	// 判断是否被选中
    	var bolSelected = $(obj).hasClass("trSelected");
    	if (bolSelected) {
    		$(obj).removeClass("trSelected");
    	} else {
    		$(obj).addClass("trSelected");
    	}
    }
    </script>
    <style type="text/css">
		.table-cgwlno{width: 40px;}
		.table-cgwltp{width: 65px;}
		.table-cgwlmcbm{width: 100px;}
		.table-cgwlmcbm2{width: 170px;}
		.table-cgwlys{width: 60px;}
		.table-cgwlcf{width: 70px;}
		.table-cgwlfk{width: 70px;}
		.table-cgwldw{width: 40px;}
		.table-cgwlghs{width: 80px;}
		.table-cgwlhth{width: 80px;}
		.table-cgwlkh{width: 80px;}
		.table-cgwlydhl{width: 70px;}
		.table-cgwlydsl{width: 70px;}
		                        
    </style>
</head>
<body style="min-width: 870px">
<form id="searchForm">
<div class="layerHeader clearfix" style="width: 900px">
	<p class="headerTitle"><spring:message code="purchaseContract_material_selectMaterial"/></p>
	<div class="headerButton clearfix">
                <button type="button" onclick="searchListForm();"><spring:message code="purchaseContract_material_search" /></button>
                <button type="button" onclick="clean();"><spring:message code="common_reset" /></button>
                <button type="button" onclick="checkMaterial();"><spring:message code="purchaseContract_material_selected" /></button>
                <button type="button" onclick="closeWin();"><spring:message code="purchaseContract_material_cancle" /></button>
                </div>
</div>
<div class="listArea" style="width: 900px" id="activity_pane">
<c:set value="<%=ResourcesUtil.getConfig(\"categoryCD\")%>" var="materialCategory" />
<c:set value="PURCHASE_TYPE-10" var="type10" />
<c:set value="PURCHASE_TYPE-20" var="type20" />
<c:set value="PURCHASE_TYPE-30" var="type30" />
	<div class="listBg">
        <div class="searchArea clearfix">
            <div id="showHtml" class=" clearfix showHtml">
                <c:choose>
                    <c:when test="${purchaseContract.purchaseType eq type20}">
                    <div class="searchInp clearfix">
                        <p><spring:message code="purchaseContract_material_supplierName"/></p>
                        <input type="text" class="w-customer"  id="ognizationNameB"  name="ognizationNameB"  value="${purchaseContract.ognizationNameB }" style="width: 180px">
                    </div>
                    </c:when>
                    <c:when test="${purchaseContract.purchaseType eq type30}">
                    <div class="searchInp clearfix">
                        <p><spring:message code="purchaseContract_material_supplierName"/></p>
                        <input type="text" class="w-customer"  id="ognizationNameB"  name="ognizationNameB"  value="${purchaseContract.ognizationNameB }" style="width: 180px" readonly="readonly">
                    </div>
                    </c:when>
                </c:choose>
                    <c:if test="${purchaseContract.purchaseType eq type10 }">
                    <div class="searchInp clearfix">
                   		<p style="width: 50px;"><spring:message code="purchaseContract_material_company"/></p>
                            <select id="ognizationId" name="ognizationId" style="width: 180px;" onchange="ogFun();">
                            <option value=""><spring:message code="supplier_pleaseChoose"/></option>
                                <c:forEach items="${ogList}" var="ogniz">
                                    <option  value="${ogniz.id}" <c:if test="${ogniz.ognizationName eq purchaseContract.ognizationNameB }">selected="selected"</c:if>> 
                                        ${ogniz.ognizationName}
                                    </option>
                                </c:forEach>
                            </select>
                	</div>
                	<div class="searchInp clearfix">
                   		<p style="width: 50px;"><spring:message code="purchaseContract_material_brand"/></p>
                            <select id="brandId" name="brandId" style="width: 150px;">
                            <option value=""><spring:message code="supplier_pleaseChoose"/></option>
                               
                            </select>
                	</div>
                    </c:if>
                    <div class="searchInp clearfix">
                        <c:choose>
                            <c:when test="${purchaseContract.purchaseType eq type20}">
                            <p><spring:message code="purchaseContract_material_category"/></p>
                            </c:when>
                            <c:when test="${purchaseContract.purchaseType eq type10}">
                                <p><spring:message code="purchaseContract_material_category"/></p>
                            </c:when>
                            <c:when test="${purchaseContract.purchaseType eq type30}">
                                <p><spring:message code="material_businessType"/></p>
                            </c:when>
                        </c:choose>
                            <select id="materialCategory" name="materialCategory" class="w-styleCategory">
                            <option value=""><spring:message code="supplier_pleaseChoose"/></option>
                                <c:forEach items="${fns:getDictList(materialCategory)}" var="category">
                                    <option  value="${category.itemCode}-${category.itemValue}" > 
                                        ${category.itemName}
                                    </option>
                                </c:forEach>
                            </select>
                	</div>
                    <c:choose>
                        <c:when test="${purchaseContract.purchaseType eq type20 }">
                            <div class="searchInp clearfix">
                                <p><spring:message code="purchaseContract_material_contractNO"/></p>
                                <input type="text" class="w-customer"  id="customerContractNO"  name="customerContractNO"  value="" >
                            </div>
                        </c:when>
<%--                        <c:when test="${purchaseContract.purchaseType eq type30 }">
                            <div class="searchInp clearfix">
                                <p><spring:message code="purchaseContract_material_contractNO"/></p>
                                <input type="text" class="w-customer"  id="customerContractNO"  name="customerContractNO"  value="" >
                            </div>
                        </c:when>--%>
                    </c:choose>
                    <div class="searchInp clearfix">
                        <p><spring:message code="purchaseContract_material_materialCode"/></p>
                        <input type="text" class="w-customer"  id="materialCode"  name="materialCode"  value="" >
                    </div>
            </div>
        </div>
        <div class="tableArea tabBoxSm" >
            <div class="tableScroll tabSm" style="overflow: auto;height: 470px;width:860px">
                <table cellpadding="0" class="tableHead " >
                    <thead>
                    <tr>
                    <c:if test="${purchaseContract.purchaseType eq type20 }">
                        		<th><p class="table-cgwlno"><spring:message code="common_no"/></p></th>
                                <th><p class="table-cgwltp"><spring:message code="purchaseContract_edit_materailImage"/></p></th>
		                        <th><p class="table-cgwlmcbm"><spring:message code="purchaseContract_edit_materailNameNO"/></p></th>
		                        <th><p class="table-cgwlys"><spring:message code="purchaseContract_edit_materailColor"/></p></th>
		                        <th><p class="table-cgwlcf"><spring:message code="purchaseContract_edit_materailComposition"/></p></th>
		                        <th><p class="table-cgwlfk"><spring:message code="purchaseContract_edit_materailSpec"/></th>
		                        <th><p class="table-cgwldw"><spring:message code="purchaseContract_edit_materailSpecUnit"/></p></th>
		                        <th><p class="table-cgwlghs"><spring:message code="purchaseContract_edit_supplierName"/></p></th>
		                        <th><p class="table-cgwlhth"><spring:message code="purchaseContract_edit_contractNO"/></p></th>
		                        <th><p class="table-cgwlkh"><spring:message code="purchaseContract_edit_styleNO"/></p></th>
		                        <th><p class="table-cgwlydhl"><spring:message code="purchaseContract_edit_reserveQuantity"/></p></th>
		                        <th><p class="table-cgwlydsl"><spring:message code="purchaseContract_edit_realityQuantity"/></p></th>
                   </c:if>
                    <c:if test="${purchaseContract.purchaseType eq type10 }">
                   				<th><p class="table-cgwlno"><spring:message code="common_no"/></p></th>
                   				<th><p class="table-cgwltp"><spring:message code="purchaseContract_edit_materailImage"/></p></th>
		                        <th><p class="table-cgwlmcbm2"><spring:message code="purchaseContract_edit_materailNameNO"/></p></th>
		                        <th><p class="table-cgwlghs"><spring:message code="purchaseContract_edit_customer"/></p></th>
		                        <th><p class="table-cgwlhth"><spring:message code="purchaseContract_edit_brand"/></p></th>
		                        <th><p class="table-cgwlys"><spring:message code="purchaseContract_edit_materailColor"/></p></th>
		                        <th><p class="table-cgwlcf"><spring:message code="purchaseContract_edit_materailComposition"/></p></th>
		                        <th><p class="table-cgwlfk"><spring:message code="purchaseContract_edit_materailSpec"/></th>
		                        <th><p class="table-cgwldw"><spring:message code="purchaseContract_edit_materailSpecUnit"/></p></th>
		                        <th><p class="table-cgwlkh"><spring:message code="purchaseContract_edit_style"/></p></th>
		                        <th><p class="table-cgwlydsl"><spring:message code="purchaseContract_edit_zhifa"/></p></th>
                   </c:if>
                    <c:if test="${purchaseContract.purchaseType eq type30 }">
		                        <th><p style="width:30px"><spring:message code="bigConsumption_head_no" /></p></th>
		                        <th><p style="width:95px"><spring:message code="myWarehouse_pic" /></p></th>
		                        <th><p style="width:80px"><spring:message code="quotation_create_materailNameNO" /></p></th>
		                        <th><p style="width:45px"><spring:message code="quotation_create_materailSpec" /></p></th>
		                        <th><p style="width:60px"><spring:message code="quotation_create_materailSpecUnit" /></p></th>
		                        <th><p style="width:60px"><spring:message code="contract_size_color" /></p></th>
		                        <th><p style="width:75px"><spring:message code="material_composition" /></p></th>
		                        <th><p style="width:75px"><spring:message code="material_businessType" /></p></th>
		                        <th><p style="width:75px"><spring:message code="material_showMateial_materialType" /></p></th>
		                        <th><p style="width:75px"><spring:message code="orderMaterielDetail_stockQuantity" /></p></th>
		                        <th><p style="width:75px"><spring:message code="inventoryWarning_materialAlertQuantity" /></p></th>
		                        <th><p style="width:75px"><spring:message code="warningDate" /></p></th>
                        </c:if>
                    </tr>
                    </thead>
                </table>
                <table cellpadding="0" class="tableBody" >              
                    <tbody id = "listHtml">
                    
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</form>
<script type="text/javascript">
$(document).ready(function(){
	// 下拉选框带搜索功能
    $("#materialCategory").select2();
    var purchaseType = "${purchaseContract.purchaseType}";
	if (purchaseType == "PURCHASE_TYPE-10") {
	    $("#ognizationId").select2();
	    $("#brandId").select2();
	    ogFun();
	}
	searchListForm();
});
</script> 
</body>
</html>
	